package com.itheima.health.dao;

import com.itheima.health.pojo.entity.OrderSetting;
import com.itheima.health.pojo.vo.OrderSettingVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

@Mapper
public interface OrdersSettingDao {
    /**
     * 预约文件上传
     * @param date
     * @param number
     */
    void insertOrderDateAndNumber(Date date, Integer number);



    @Select("select orderDate, number, reservations from t_ordersetting where orderDate = #{beginDate}")
    OrderSettingVo selectAll(LocalDate beginDate);

    @Select("select *from t_ordersetting where orderDate = #{orderDate};")
    OrderSetting selectByDate(LocalDate orderDate);

    void update(OrderSetting orderSetting);

    @Insert("insert into t_ordersetting values(null, #{orderDate}, #{number}, #{reservations})")
    void insertOrder(OrderSetting orderSetting);
}
